﻿<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/bootstrap/css/bootstrap.min.css">
	<script src="${pageContext.request.contextPath}/bootstrap/js/jquery-2.1.0.min.js"></script>
	<script src="${pageContext.request.contextPath}/bootstrap/js/bootstrap.min.js"></script>
    <style>
		.panel{
			margin-bottom: 0px;
		}
		.panel-body{
			background-color: #337ab7;
			color: #fff;
		}
		.panel-body a{
			color: #fff;
			font-size: 20px;
		}
       .aside{
		   width: 300px;
		   border: 1px solid #ccc;
		   height: 700px;
	   }
	   .menu .panel-heading{
			background-color: #337ab7;
			color: #fff;
			cursor: pointer;
	   }
	   .menu .list-group{
		   display: none;
	   }
	   .aside{
		   float: left;
		   width: 15%;
	   }
	   .right{
		   float: left;
		   width: 85%;
		   height: 700px;
	   }

    </style>
</head>
<body>
<c:if test="${empty houuser}">
	<c:redirect url="/houtai/houlogin"/>
</c:if>
	<div>
		<div class="top">
			<div class="panel panel-default panel-custom">
				<div class="panel-body">
				  <a href="">
					  <span>顽石旅游线路管理系统</span>
				  </a>
				  <span style="float: right;">
					<span>欢迎：${houuser.username}</span>
					<a href="${pageContext.request.contextPath}/houuser/tuichu">退出</a>
				  </span>
				</div>
			  </div>
		</div>
		<div class="content">
			<div class="aside">
				<div class="menu">
					<div class="panel panel-default">
						<!-- Default panel contents -->
						<div class="panel-heading">
							<span>权限管理</span>
						</div>
						<!-- List group -->
						<ul class="list-group">
							<li class="list-group-item">
								<a href="${pageContext.request.contextPath}/houuser/list" target="myFrame">后台用户管理</a>
							</li>
						  <li class="list-group-item">
							  <a href="${pageContext.request.contextPath}/acl_role/list" target="myFrame">角色管理</a>
						  </li>
						  <li class="list-group-item">
							  <a href="${pageContext.request.contextPath}/menu/list" target="myFrame">菜单管理</a>
						  </li>
						</ul>
					</div>
				</div>
				<div class="menu">
					<div class="panel panel-default">
						<!-- Default panel contents -->
						<div class="panel-heading">
							<span>线路管理</span>
						</div>
						<!-- List group -->
						<ul class="list-group">
						  <li class="list-group-item">
							  <a href="${pageContext.request.contextPath}/route/list" target="myFrame">线路列表</a>
						  </li>
						  <li class="list-group-item">
							  <a href="${pageContext.request.contextPath}/lunbotu/list" target="myFrame">线路轮播图</a>
						  </li>
						  <li class="list-group-item">
							  <a href="${pageContext.request.contextPath}/route_map/list" target="myFrame">线路附图</a>
						  </li>
						</ul>
					</div>
				</div>
				<div class="menu">
					<div class="panel panel-default">
						<!-- Default panel contents -->
						<div class="panel-heading">
							<span>前台用户管理</span>
						</div>
						<!-- List group -->
						<ul class="list-group">
						  <li class="list-group-item">
							  <a href="${pageContext.request.contextPath}/user/list" target="myFrame">用户管理</a>
						  </li>
						</ul>
					</div>
				</div>
				<div class="menu">
					<div class="panel panel-default">
						<div class="panel-heading">
							<span>内容管理</span>
						</div>
						<ul class="list-group">
						  <li class="list-group-item">
							  <a href="${pageContext.request.contextPath}/column/list" target="myFrame">栏目管理</a>
						  </li>
						</ul>
					</div>
				</div>
				<div class="menu">
					<div class="panel panel-default">
						<div class="panel-heading">
							<span>订单管理</span>
						</div>
						<ul class="list-group">
						  <li class="list-group-item">
							  <a href="${pageContext.request.contextPath}/order/list" target="myFrame">订单管理</a>
						  </li>
						</ul>
					</div>
				</div>
				<div class="menu">
					<div class="panel panel-default">
						<div class="panel-heading">
							<span>商家管理</span>
						</div>
						<ul class="list-group">
						  <li class="list-group-item">
							  <a href="${pageContext.request.contextPath}/shangjia/list" target="myFrame">商家管理</a>
						  </li>
						</ul>
					</div>
				</div>
				<div class="menu">
					<div class="panel panel-default">
						<div class="panel-heading">
							<span>友情链接</span>
						</div>
						<ul class="list-group">
							<li class="list-group-item">
								<a href="${pageContext.request.contextPath}/links/list" target="myFrame">链接管理</a>
							</li>
							
						</ul>
					</div>
				</div>
			</div>

			<div class="right">
				<style>
				/* 新增全局布局样式 */
				html, body {
				height: 100%;
				margin: 0;
				padding: 0;
				overflow: hidden;
				}
				.top {
				height: 60px;
				}
				.content {
				display: flex;
				height: calc(100vh - 60px);
				}
				.aside {
				width: 300px;
				height: 100%;
				overflow-y: auto;
				border-right: 1px solid #ccc;
				}
				.right {
				flex: 1;
				width: 100%;
				height: 100%;
				margin: 0;
				padding: 0; /* 确保没有内边距 */
				overflow: hidden; /* 防止出现滚动条 */
				}
				iframe {
				width: 100%; /* 确保宽度占满父容器 */
				height: 100%; /* 确保高度占满父容器 */
				border: none;
				display: block; /* 确保iframe作为块级元素渲染 */
				}
				</style>
				<div class="right">
				<iframe name="myFrame" src="${pageContext.request.contextPath}/houtai/welcome"></iframe>
				</div>

			</div>
		</div>
		<div class="footer">

		</div>
	</div>
	<script>
		var menus = document.querySelectorAll(".menu .panel-heading");

		menus.forEach(element => {
			var isshow = false;
			element.onclick = function(){
				var list_group = this.nextElementSibling;
				if(isshow){
					list_group.style.display = "none";
					isshow = false
				}else{
					list_group.style.display = "block";
					isshow = true
				}
			}
		});
	</script>
</body>
</html>